From: Owen W. Taylor Date: Sat, 2 Apr 2011 19:30:45 +0000 (-0400) Subject: network: deal with recycling of closed active connections X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8356 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=529b6ca9359de2b97b5114a642d61d2ecfc7b5db;p=gnome-shell.git network: deal with recycling of closed active connections If you restart NetworkManager, then the list of active connections is emptied, then comes back with the same GObjects in it. If the _primaryDevice field isn't cleared on the object, then we won't know we need to set it back on the device, resulting in the active device not showing up in the menu. https://bugzilla.gnome.org/show_bug.cgi?id=646558 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 885c5d793..5510272c1 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1758,8 +1758,10 @@ NMApplet.prototype = { for (let i = 0; i < closedConnections.length; i++) { let active = closedConnections[i]; - if (active._primaryDevice) + if (active._primaryDevice) { active._primaryDevice.setActiveConnection(null); + active._primaryDevice = null; + } if (active._notifyStateId) { active.disconnect(active._notifyStateId); active._notifyStateId = 0;